package com.gitee.hermer.engine.jars.core.context;

import java.util.List;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import com.gitee.hermer.engine.jars.core.context.domain.EngineAppInfoContext;
import com.gitee.hermer.engine.jars.core.context.impl.EngineAppContextImpl.EngineAppLoaderState;

public interface IEngineAppContext extends InitializingBean,DisposableBean{
	
	
	public void register(String cacheKey, EngineAppInfoContext context);
	
	public void unregister(String cacheKey);
	
	public boolean updateEngineAppLoaderState(String cacheKey,EngineAppLoaderState state,boolean isVerify);
	
	public boolean updateEngineAppLoaderState(String cacheKey,EngineAppLoaderState state);
	
	public EngineAppLoaderState getCurrentLoaderState(String cacheKey);
	
	public EngineAppInfoContext getEnableAppModelContext(String cacheKey);
	
	public List<EngineAppInfoContext> getEnableAppModelContextList();
	
	public EngineAppInfoContext getEnableAppModelContext(String projectName, String version);

}
